home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5835 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: dmpeter@aol.com (Dmpeter)
  3. Newsgroups: comp.lang.c
  4. Subject: Calling a DOS TSR from C
  5. Date: 21 Feb 1996 09:14:55 -0500
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4gf9cv$52q@newsbf02.news.aol.com>
  9. Reply-To: dmpeter@aol.com (Dmpeter)
  10. NNTP-Posting-Host: newsbf02.mail.aol.com
  11.  
  12. I have written a DOS C program which launches a 1 K DOS TSR with one
  13. argument.  I have used a number of different methods to launch the TSR
  14. (see below), but none are adequate:
  15.  
  16. -When I  use the 'system' function  to launch the TSR, it takes the
  17. argument and runs the TSR fine.  A mem/s shows that the TSR is in fact
  18. taking only 1K, but my largest executable program size is cut down by 90K.
  19.  The C program is not clearing properly, even when I put in an exit(0).
  20.  
  21. -When I use the 'exec' or 'spawn' family of functions, memory is no longer
  22. leaked, but the argument is not being passed to the TSR at all. 
  23.  (ex.  execl(*PrgName,*Argument,NULL)
  24.  
  25. Is there anyone that can shed some light on this problem for me?  It would
  26. be much appreciated.
  27.  
  28.  
  29. Thanks-
  30.  
  31. Dan Peterson
  32.